﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace A2DFramework.SQLDispatcherService
{
    public class ConnectionOption
    {
        private ConnectionOption()
        {
        }


        public string ConnectionName { get; set; }
        public string DedicatedRegion { get; set; }
        public SqlExecuteType ExecuteType { get; set; }





        public static ConnectionOption Create(string connectionName)
        {
            return Create(connectionName, SqlExecuteType.Read);
        }

        public static ConnectionOption Create(string connectionName, SqlExecuteType executeType)
        {
            ConnectionOption option = new ConnectionOption();

            option.ConnectionName = connectionName;
            option.ExecuteType = executeType;

            return option;
        }

        public static ConnectionOption Create(string connectionName, string region)
        {
            ConnectionOption option = new ConnectionOption();

            option.ConnectionName = connectionName;
            option.ExecuteType = SqlExecuteType.Read;

            return option;
        }
    }
}
